template<typename Tint>
class node {
public:
    Tint my_node;
    node* next_ptr, * last_ptr;
    void set_value(Tint a);
    void append(node*);
    node() { my_node = 0; next_ptr = NULL; last_ptr = NULL; }
    node* get_next();
    Tint get_value();
};

template<typename Tint>
void node<Tint>::set_value(Tint a)
{
    this->my_node = a;
}
template<typename Tint>
void node<Tint>::append(node* next)
{
    this->next_ptr = next;
    next->last_ptr = this;
}
template<typename Tint>
node<Tint>* node<Tint>::get_next()
{
    return this->next_ptr;
}
template<typename Tint>
Tint node<Tint>::get_value()
{
    return this->my_node;
}